package com.example.toy.core.dataset;

import java.io.Serializable;
import java.util.Map;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author shenb
 * @date 2021-12-20 21:55
 */
@Getter
@RequiredArgsConstructor
public class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, R>>, Serializable {

  private final L left;
  private final R right;

  @Override
  public int compareTo(Pair<L, R> o) {
    return 0;
  }

  @Override
  public L getKey() {
    return left;
  }

  @Override
  public R getValue() {
    return right;
  }

  @Override
  public R setValue(R value) {
    throw new UnsupportedOperationException("Unsupported set value");
  }
}
